package vo {
	import org.davekeen.flextrine.orm.PersistentCollection;
	import org.davekeen.flextrine.orm.FlextrineError;
  	import vo.Student;
   	import vo.Course;
  
	[Bindable]
	public class MarkEntityBase {
		
		public var isUnserialized__:Boolean;
		
		public var isInitialized__:Boolean = true;
		
		public var isCollectionInitializedMap__:Object = new Object();
		
		[Id]
		public var id:String;
		
		public function get mark():Number { checkIsInitialized("mark"); return _mark; }
		public function set mark(value:Number):void { _mark = value; }
		private var _mark:Number = 0;
		
		[Association]
		public function get student():Student { checkIsInitialized("student"); return _student; }
		public function set student(value:Student):void { _student = value; }
		private var _student:Student;
		
		[Association]
		public function get course():Course { checkIsInitialized("course"); return _course; }
		public function set course(value:Course):void { _course = value; }
		private var _course:Course;
		
		public function MarkEntityBase() {
		}
		
		public function toString():String {
			return "[Mark id=" + id + "]";
		}
		
		private function checkIsInitialized(property:String):void {
			if (!isInitialized__ && isUnserialized__)
				throw new FlextrineError("Attempt to get property '" + property + "' on unitialized Mark.  Consider using EntityManager::require or eager loading.", FlextrineError.ACCESSED_UNITIALIZED_ENTITY);
		}
		
	}

}
